import 'package:plugin_platform_interface/plugin_platform_interface.dart';
import 'mop_ext_wechat_handlers.dart';
import 'mop_ext_wechat_method_channel.dart';


abstract class MopExtWechatPlatform extends PlatformInterface {
  /// Constructs a MopExtWechatPlatform.
  MopExtWechatPlatform() : super(token: _token);

  static final Object _token = Object();

  static MopExtWechatPlatform _instance = MethodChannelMopExtWechat();

  /// The default instance of [MopExtWechatPlatform] to use.
  ///
  /// Defaults to [MethodChannelMopExtWechat].
  static MopExtWechatPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [MopExtWechatPlatform] when
  /// they register themselves.
  static set instance(MopExtWechatPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }


  /// 注册组件
  ///
  /// [wxAppId] 应用在微信开放平台注册的appId
  /// [universalLink] universalLink
  ///
  /// 返回初始化是否成功
  Future<Map> registerComponent({
    required String wxAppId,
    required String universalLink,
  }) {
    throw UnimplementedError('registerComponent() has not been implemented.');
  }


  // 事件处理器集合
  MopExtWechatHandlers? handlers;

}
